const env = process.argv.slice(-1)

const proxyMap = {
    ['default']: 'http://192.168.0.1:3000',
    ['dev']: 'http://192.168.0.1:3001',
    ['test']: 'http://192.168.0.1:3002'
}

const target = env ? proxyMap[String(env)] :
    proxyMap.default

export default {
    '/api': {
        target: target, //测试
        changeOrigin: true,
        pathRewrite: { '^/api': '' },
    },
}